import { resgetSearch } from "@/api";
const actions={
    async getsearchlist({commit},params={}){
        let result=await resgetSearch(params);
        if(result.code==200){
            commit('GETSEARCH',result.data)
        }
    }
} 
const mutations={
    GETSEARCH(state,searchList){
        state.searchList=searchList
    }
}
const getters={
    goodsList(state){
        return state.searchList.goodsList || [];
    },
    attrsList(state){
        return state.searchList.attrsList || [];
    },
    trademarkList(state){
        return state.searchList.trademarkList || [];
    },
}
const state={
    searchList:{}
}
export default {
    actions,
    mutations,
    getters,
    state
}